/*
Replication code for:
Balci, Ali
Do Gladiators Fight For Their Masters? Voting Behavior of the US-promoted UNSC Memembers in the Early Cold War
PS: Political Science & Politics

Code Source: Dreher, Axel
Lang, Valentin, Rosendorff, B. Peter, Vreeland, James Raymond,
Bilateral or Multilateral? International Financial Flows and the Dirty-Work Hypothesis
Journal of Politics
*/

*Table 3

xtreg  Drh_mydata_only_res  Pro_Campaign yearFE* if unsc == 1 & p5 == 0 , fe cluster(countryid)
est store taba1
	estadd local "Dependent" Vote against US
	estadd local "FE" Yes
	cap drop baselinesample
	cap gen baselinesample = 1 if e(sample)

xtreg  Drh_mydata_only_res  Pro_Campaign l_pctagreeus_unga yearFE* if unsc == 1 & p5 == 0 , fe cluster(countryid)
est store taba2
	estadd local "Dependent" Vote against US
	estadd local "FE" Yes
	cap drop baselinesample
	cap gen baselinesample = 1 if e(sample)

xtreg  Drh_mydata_only_res  Pro_Campaign DefenceATOP l_pctagreeus_unga yearFE* if unsc == 1 & p5 == 0 , fe cluster(countryid)
est store taba3
	estadd local "Dependent" Vote against US
	estadd local "FE" Yes
	cap drop baselinesample
	cap gen baselinesample = 1 if e(sample)

xtreg  voteagainstUSA_disag_cymean Pro_Campaign yearFE* if unsc == 1 & p5 == 0 , fe cluster(countryid)
est store tabb1
	estadd local "Dependent" Vote against US Dreher
	estadd local "FE" Yes
	cap drop baselinesample
	cap gen baselinesample = 1 if e(sample)

xtreg  voteagainstUSA_disag_cymean  Pro_Campaign l_pctagreeus_unga yearFE* if unsc == 1 & p5 == 0 , fe cluster(countryid)
est store tabb2
	estadd local "Dependent" Vote against US Dreher
	estadd local "FE" Yes
	cap drop baselinesample
	cap gen baselinesample = 1 if e(sample)

xtreg  voteagainstUSA_disag_cymean  Pro_Campaign DefenceATOP l_pctagreeus_unga yearFE* if unsc == 1 & p5 == 0 , fe cluster(countryid)
est store tabb3
	estadd local "Dependent" Vote against US Dreher
	estadd local "FE" Yes
	cap drop baselinesample
	cap gen baselinesample = 1 if e(sample)
	
estout taba* tabb* using "tables/Table3.xls", title("") ///
 replace delimiter(_tab) label noabbrev style(tab) collabels(none) ///
 drop( _cons ) indicate("Year FE = yearFE*")    ///
 order(Pro_Campaign  l_pctagreeus_unga  DefenceATOP) ///
 cells(b(star fmt(3)) se(par([ ]) abs fmt(3))) starlevels(* 0.1 ** 0.05 *** 0.01) ///
 stats(FE N r2 pvalue Dependent, fmt(0 0 3 3 0) label("Country FE" "Observations" "R-squared" "Dependent Variable")) ///
 mlabels("[1]" "[2]" "[3]" "[4]" "[5]" "[6]") //